Commit 07db56cf authored by stettberger's avatar stettberger

Bugfix in Buddylist

parent 1335223f
......@@ -58,6 +58,7 @@ add_buddy(SilcClientEntry client) {
for (tmp=buddies; tmp; tmp=tmp->next)
if (tmp->client==client)
return;
DEBUG("New Buddy on List: %s", client->nickname);
if(buddies) {
for (tmp=buddies; tmp->next; tmp=tmp->next);
tmp->next=new;
......
......@@ -247,12 +247,16 @@ void sig_handler(int sig){
else
silc_client_command_call(silc_client->client, silc_client->conn, "quit Leaving", NULL);
}
silc_schedule_unset_listen_fd(silc_client->client->schedule, buddyfd);
silc_schedule_task_del_by_fd(silc_client->client->schedule, buddyfd);
close(buddyfd);
buddyfd=0;
int i;
for (i=0; i < MAX_CONNS; i++){
if(!buddy_conns[i])
continue;
close(buddy_conns[i]);
buddy_conns[i]=0;
}
char *fd=malloc(strlen(ircdir)+15);
NULL_TEST(fd);
......@@ -1184,7 +1188,7 @@ silc_command(SilcClient client, SilcClientConnection conn,
SilcCommand command, SilcStatus status)
{
/* If error occurred in client library with our command, print the error */
if (status != SILC_STATUS_OK){
if (status != SILC_STATUS_OK && command != SILC_COMMAND_WATCH){
print_out("", "-!- Error: %s: %s",
silc_get_command_name(command),
silc_get_status_message(status));
......@@ -1209,7 +1213,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
char *str, *str2;
int type;
/* If error occurred in client library with our command, print the error */
if (SILC_STATUS_IS_ERROR(status)) {
if (SILC_STATUS_IS_ERROR(status) && command != SILC_COMMAND_WATCH) {
print_out("", "-!- Error %s: %s",
silc_get_command_name(command),
silc_get_status_message(status));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment