~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/iax2/miniphone.c

  • Committer: Package Import Robot
  • Author(s): Whoopie
  • Date: 2012-03-22 10:29:10 UTC
  • mfrom: (4.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120322102910-tb8hugi2su1tguwh
Tags: 1.0.2-1ubuntu1
* Apply some upstream patches to fix FTBFS (LP: #913018):
  - debian/patches/05_glib_includes.patch: fix glib includes.
  - debian/patches/06_use_XkbKeycodeToKeysym.patch: use 
    XkbKeycodeToKeysym instead of (deprecated) XKeycodeToKeysym.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
                        return -1;
196
196
                }
197
197
                /* Calculate how many samples we can send, max */
198
 
                if (total > (abi.fragments * abi.fragsize / 2)) 
 
198
                if (total > (abi.fragments * abi.fragsize / 2))
199
199
                        total = abi.fragments * abi.fragsize / 2;
200
200
                res = total;
201
201
                if (sampsent < sounds[cursound].samplen) {
202
202
                        myoff=0;
203
203
                        while(total) {
204
204
                                amt = total;
205
 
                                if (amt > (sounds[cursound].datalen - offset)) 
 
205
                                if (amt > (sounds[cursound].datalen - offset))
206
206
                                        amt = sounds[cursound].datalen - offset;
207
207
                                memcpy(myframe + myoff, sounds[cursound].data + offset, amt * 2);
208
208
                                total -= amt;
213
213
                                        offset = 0;
214
214
                        }
215
215
                        /* Set it up for silence */
216
 
                        if (sampsent >= sounds[cursound].samplen) 
 
216
                        if (sampsent >= sounds[cursound].samplen)
217
217
                                silencelen = sounds[cursound].silencelen;
218
218
                        frame = myframe;
219
219
                } else {
463
463
                                timerptr = &timer;
464
464
                                timer.tv_sec = m /1000;
465
465
                                timer.tv_usec = (m % 1000) * 1000;
466
 
                        } else 
 
466
                        } else
467
467
                                timerptr = 0;
468
468
                        regm = check_iax_timeout();
469
469
                        if (!timerptr || (m > regm)) {
512
512
 
513
513
 
514
514
                        if(e->event.connect.callerid && e->event.connect.dnid)
515
 
                                fprintf(f, "Call from '%s' for '%s'", e->event.connect.callerid, 
 
515
                                fprintf(f, "Call from '%s' for '%s'", e->event.connect.callerid,
516
516
                                e->event.connect.dnid);
517
517
                        else if(e->event.connect.dnid) {
518
518
                                fprintf(f, "Call from '%s'", e->event.connect.dnid);
664
664
                                                        int res;
665
665
 
666
666
                                                        res = write(audiofd, fr, sizeof(fr));
667
 
                                                        if (res < 0) 
 
667
                                                        if (res < 0)
668
668
                                                                fprintf(f, "Write failed: %s\n", strerror(errno));
669
669
                                                }
670
670
                                                len += 33;
696
696
                offhook = 0;
697
697
                ringing = 0;
698
698
                gentone(TONE_NONE, 0);
699
 
}                                                                               
 
699
}
700
700
 
701
701
void
702
702
parse_cmd(FILE *f, int argc, char **argv)