Ejemplo n.º 1
0
static void state(struct mwSession *s, enum mwSessionState state,
		  gpointer info) {

  struct mwSessionHandler *sh;

  g_return_if_fail(s != NULL);
  g_return_if_fail(s->handler != NULL);

  if(mwSession_isState(s, state)) return;

  s->state = state;
  s->state_info = info;

  switch(state) {
  case mwSession_STOPPING:
  case mwSession_STOPPED:
    g_message("session state: %s (0x%08x)", state_str(state),
	      GPOINTER_TO_UINT(info));
    break;

  case mwSession_LOGIN_REDIR:
    g_message("session state: %s (%s)", state_str(state),
	      (char *)info);
    break;

  default:
    g_message("session state: %s", state_str(state));
  }

  sh = s->handler;
  if(sh && sh->on_stateChange)
    sh->on_stateChange(s, state, info);
}
Ejemplo n.º 2
0
static void state(struct mwSession *s, enum mwSessionState state,
		  gpointer info) {

  struct mwSessionHandler *sh;

  g_return_if_fail(s != NULL);
  g_return_if_fail(s->handler != NULL);

  if(mwSession_isState(s, state)) return;

  s->state = state;
  s->state_info = info;

  switch(state) {
  case mwSession_STOPPING:
  case mwSession_STOPPED:
    g_message("session state: %s (0x%08x)", state_str(state),
	      GPOINTER_TO_UINT(info));
    break;

  case mwSession_LOGIN_REDIR:
	/// Miranda NG adaptation - start - https://developer.pidgin.im/ticket/7563#comment:4
    //g_message("session state: %s (%s)", state_str(state), (char *)info);
    g_message("session state: %s (%s)", state_str(state), NSTR((char *)info));
	/// Miranda NG adaptation - end
    break;

  default:
    g_message("session state: %s", state_str(state));
  }

  sh = s->handler;
  if(sh && sh->on_stateChange)
    sh->on_stateChange(s, state, info);
}