summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLubos Lunak <l.lunak@ suse.cz>2006-03-03 17:23:20 +0000
committerLubos Lunak <l.lunak@ suse.cz>2006-03-03 17:23:20 +0000
commit15e2f580542596ab813096bdb14e6840930e221b (patch)
tree7eae6566e687895295d109a36c1baabf3606e3c1 /lib
parent52caed76bb0b83f7c89d858a4c2f5a933462bae2 (diff)
0 means invalid sequence number, make sure it's not generated.
Diffstat (limited to 'lib')
-rw-r--r--lib/comm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/comm.c b/lib/comm.c
index 0ddc349..6f38ef4 100644
--- a/lib/comm.c
+++ b/lib/comm.c
@@ -188,7 +188,9 @@ void dapi_close( DapiConnection* conn )
static int getNextSeq( DapiConnection* conn )
{
- return ++conn->last_seq;
+ if( ++conn->last_seq == 0 ) // 0 means invalid
+ ++conn->last_seq;
+ return conn->last_seq;
}
static char* readString( DapiConnection* conn, int len )