mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Reformat sftp_dequeue().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@583 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -533,13 +533,19 @@ static int sftp_enqueue(SFTP_SESSION *sftp, SFTP_MESSAGE *msg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* pulls of a message from the queue based on the ID. returns null if no message has been found */
|
||||
/*
|
||||
* Pulls of a message from the queue based on the ID.
|
||||
* Returns NULL if no message has been found.
|
||||
*/
|
||||
static SFTP_MESSAGE *sftp_dequeue(SFTP_SESSION *sftp, u32 id){
|
||||
REQUEST_QUEUE *queue,*prev=NULL;
|
||||
REQUEST_QUEUE *prev = NULL;
|
||||
REQUEST_QUEUE *queue;
|
||||
SFTP_MESSAGE *msg;
|
||||
|
||||
if(sftp->queue == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
queue = sftp->queue;
|
||||
while (queue) {
|
||||
if(queue->message->id == id) {
|
||||
@@ -560,6 +566,7 @@ static SFTP_MESSAGE *sftp_dequeue(SFTP_SESSION *sftp, u32 id){
|
||||
prev = queue;
|
||||
queue = queue->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user