summaryrefslogtreecommitdiff
authorMarek Vasut <marek.vasut@gmail.com>2007-07-14 22:09:38 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-15 18:33:28 (UTC)
commit9dacb2c97939fad573446c0858f6b536b3d7bf15 (patch) (unidiff)
tree6cb098508e6513f67d608278bf6f61a08fb6d158
parent15fbd2a9189281ca84d89ad6a77261d0046add36 (diff)
downloadopie-9dacb2c97939fad573446c0858f6b536b3d7bf15.zip
opie-9dacb2c97939fad573446c0858f6b536b3d7bf15.tar.gz
opie-9dacb2c97939fad573446c0858f6b536b3d7bf15.tar.bz2
obex receive fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obexserver.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/core/obex/obexserver.cpp b/core/obex/obexserver.cpp
index f1fb205..786e9f7 100644
--- a/core/obex/obexserver.cpp
+++ b/core/obex/obexserver.cpp
@@ -207,7 +207,18 @@ static void obex_conn_event (obex_t *handle, obex_object_t *object,
207 /* Comes when a server-request has been received. */ 207 /* Comes when a server-request has been received. */
208 handle_request (handle, object, event, obex_cmd); 208 handle_request (handle, object, event, obex_cmd);
209 break; 209 break;
210 210 case OBEX_EV_REQDONE:
211 switch(obex_cmd) {
212 case OBEX_CMD_PUT:
213 case OBEX_CMD_CONNECT:
214 break;
215 case OBEX_CMD_DISCONNECT:
216 OBEX_TransportDisconnect(handle);
217 break;
218 default:
219 break;
220 }
221 break;
211 case OBEX_EV_LINKERR: 222 case OBEX_EV_LINKERR:
212 break; 223 break;
213 } 224 }
@@ -424,20 +435,12 @@ bool ObexServer::start(RunMode runmode, Communication comm)
424 435
425 if (initObex() == 0) { 436 if (initObex() == 0) {
426 do { 437 do {
427 int result; //Connection result
428 if ( fd[ 1 ] ) { 438 if ( fd[ 1 ] ) {
429 ::close(fd[1]); 439 ::close(fd[1]);
430 fd[1] = 0; 440 fd[1] = 0;
431 } 441 }
432 if ((result = OBEX_HandleInput(m_obex, 60)) < 0) { 442 if (OBEX_HandleInput(m_obex, 10) < 0)
433 if (errno != ECONNRESET) { 443 _exit(0);
434 printf("OBEX_HandleInput error %d\n", errno);
435 fflush(stdout);
436 _exit(-1);
437 }
438 else
439 _exit(0);
440 }
441 } while(1); 444 } while(1);
442 } 445 }
443 char resultByte = 1; 446 char resultByte = 1;