| 2454:e6619c1d0e29 | 2455:014bd5a2d3fe |
|---|---|
| 47 int service, const char *active_id, void *buf, guint msgtype) | 47 int service, const char *active_id, void *buf, guint msgtype) |
| 48 { | 48 { |
| 49 struct yahoo_packet *pkt; | 49 struct yahoo_packet *pkt; |
| 50 int ret; | 50 int ret; |
| 51 | 51 |
| 52 if (!session || !conn) | 52 if (!session || !session->login || !conn || !active_id) |
| 53 return 0; | 53 return 0; |
| 54 | 54 |
| 55 if (!(pkt = g_new0(struct yahoo_packet, 1))) | 55 if (!(pkt = g_new0(struct yahoo_packet, 1))) |
| 56 return 0; | 56 return 0; |
| 57 | 57 |
| 149 struct yahoo_conn *conn; | 149 struct yahoo_conn *conn; |
| 150 | 150 |
| 151 if (!session) | 151 if (!session) |
| 152 return 0; | 152 return 0; |
| 153 | 153 |
| 154 if (!session->login) | |
| 155 return 0; | |
| 156 | |
| 154 if (!(conn = yahoo_getconn_type(session, YAHOO_CONN_TYPE_MAIN))) | 157 if (!(conn = yahoo_getconn_type(session, YAHOO_CONN_TYPE_MAIN))) |
| 155 return 0; | 158 return 0; |
| 156 | 159 |
| 157 return yahoo_write_cmd(session, conn, YAHOO_SERVICE_LOGOFF, session->name, session->name, 0); | 160 return yahoo_write_cmd(session, conn, YAHOO_SERVICE_LOGOFF, session->name, session->name, 0); |
| 158 } | 161 } |