~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to compat/msdun.c

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  BlueZ - Bluetooth protocol stack for Linux
4
4
 *
5
5
 *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com>
6
 
 *  Copyright (C) 2002-2009  Marcel Holtmann <marcel@holtmann.org>
 
6
 *  Copyright (C) 2002-2010  Marcel Holtmann <marcel@holtmann.org>
7
7
 *
8
8
 *
9
9
 *  This program is free software; you can redistribute it and/or modify
58
58
        char buf[40];
59
59
        unsigned len = 0;
60
60
        int r;
61
 
        
 
61
 
62
62
        while (1) {
63
63
                r = read(fd, buf + len, sizeof(buf) - len - 1);
64
64
                if (r < 0) {
92
92
                write_n(fd, "CLIENTSERVER", 12);
93
93
        case MS_PPP:
94
94
                return MS_SUCCESS;
95
 
        default:        
 
95
        default:
96
96
                return MS_FAILED;
97
97
        }
98
98
}
123
123
 
124
124
                        alarm(0);
125
125
                        signal(SIGALRM, osig);
126
 
                
 
126
 
127
127
                        switch (r) {
128
128
                        case MS_SUCCESS:
129
129
                        case MS_PPP:
142
142
                }
143
143
 
144
144
                alarm(timeout);
145
 
                
 
145
 
146
146
                if (server)
147
147
                        r = ms_server(fd);
148
148
                else