mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 02:18:15 +00:00
Merged revisions 105899 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r105899 | russell | 2008-03-04 18:45:39 -0600 (Tue, 04 Mar 2008) | 3 lines Fix the SHARED() read callback to properly unlock the channel. This function could not have worked, as it left the channel locked in all cases. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@106309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -109,8 +109,11 @@ static int shared_read(struct ast_channel *chan, const char *cmd, char *data, ch
|
|||||||
} else
|
} else
|
||||||
ast_channel_lock(chan);
|
ast_channel_lock(chan);
|
||||||
|
|
||||||
if (!(varstore = ast_channel_datastore_find(chan, &shared_variable_info, NULL)))
|
if (!(varstore = ast_channel_datastore_find(chan, &shared_variable_info, NULL))) {
|
||||||
|
ast_channel_unlock(chan);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
varshead = varstore->data;
|
varshead = varstore->data;
|
||||||
*buf = '\0';
|
*buf = '\0';
|
||||||
|
|
||||||
@@ -122,6 +125,8 @@ static int shared_read(struct ast_channel *chan, const char *cmd, char *data, ch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ast_channel_unlock(chan);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user