~vcs-imports/qemu/maemo

« back to all changes in this revision

Viewing changes to vnc.c

  • Committer: Riku Voipio
  • Date: 2009-06-08 15:31:58 UTC
  • mfrom: (6281.2.366)
  • mto: This revision was merged to the branch mainline in revision 6452.
  • Revision ID: git-v1:759b334a9739814df2883aa4c41b1c0f5670e90a
Merge commit 'gnu/master' into test

Epic merge

Conflicts:
        Makefile
        block.c
        block.h
        configure
        hw/boards.h
        hw/flash.h
        hw/integratorcp.c
        hw/nand.c
        hw/omap2.c
        hw/omap_i2c.c
        hw/sd.c
        hw/smc91c111.c
        hw/tsc2005.c
        hw/tusb6010.c
        hw/usb-musb.c
        linux-user/syscall.c
        target-arm/machine.c
        target-arm/translate.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    }
66
66
 
67
67
    /* Enough for the existing format + the 2 vars we're
68
 
     * subsituting in. */
 
68
     * substituting in. */
69
69
    addrlen = strlen(format) + strlen(host) + strlen(serv);
70
70
    addr = qemu_malloc(addrlen + 1);
71
71
    snprintf(addr, addrlen, format, host, serv);
86
86
    return addr_to_string(format, &sa, salen);
87
87
}
88
88
 
89
 
 
90
89
char *vnc_socket_remote_addr(const char *format, int fd) {
91
90
    struct sockaddr_storage sa;
92
91
    socklen_t salen;
855
854
    ops.destroy = audio_capture_destroy;
856
855
    ops.capture = audio_capture;
857
856
 
858
 
    vs->audio_cap = AUD_add_capture(NULL, &vs->as, &ops, vs);
 
857
    vs->audio_cap = AUD_add_capture(&vs->as, &ops, vs);
859
858
    if (!vs->audio_cap) {
860
859
        monitor_printf(mon, "Failed to add audio capture\n");
861
860
    }
2034
2033
 
2035
2034
void vnc_display_init(DisplayState *ds)
2036
2035
{
2037
 
    VncDisplay *vs;
 
2036
    VncDisplay *vs = qemu_mallocz(sizeof(*vs));
2038
2037
 
2039
 
    vs = qemu_mallocz(sizeof(VncState));
2040
2038
    dcl = qemu_mallocz(sizeof(DisplayChangeListener));
2041
2039
 
2042
2040
    ds->opaque = vs;
2101
2099
    return 0;
2102
2100
}
2103
2101
 
 
2102
char *vnc_display_local_addr(DisplayState *ds)
 
2103
{
 
2104
    VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
 
2105
    
 
2106
    return vnc_socket_local_addr("%s:%s", vs->lsock);
 
2107
}
 
2108
 
2104
2109
int vnc_display_open(DisplayState *ds, const char *display)
2105
2110
{
2106
2111
    VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;