~ubuntu-branches/ubuntu/maverick/dbus/maverick-security

« back to all changes in this revision

Viewing changes to dbus/dbus-marshal-basic.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-27 13:06:32 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20100927130632-bqs145trvchd2lmf
Tags: 1.4.0-0ubuntu1
* New upstream release
 - Fixes https://bugs.freedesktop.org/show_bug.cgi?id=17754 Race condition in protected_change_timeout
 - Requested by various upstream KDE developers http://lists.kde.org/?t=128514970000004&r=1&w=2

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 *
23
23
 */
24
24
 
 
25
#include <config.h>
25
26
#include "dbus-internals.h"
26
27
#include "dbus-marshal-basic.h"
27
28
#include "dbus-signature.h"
414
415
    case DBUS_TYPE_BOOLEAN:
415
416
    case DBUS_TYPE_INT32:
416
417
    case DBUS_TYPE_UINT32:
 
418
    case DBUS_TYPE_UNIX_FD:
417
419
      pos = _DBUS_ALIGN_VALUE (pos, 4);
418
420
      set_4_octets (str, pos, vp->u32, byte_order);
419
421
      if (old_end_pos)
540
542
    case DBUS_TYPE_INT32:
541
543
    case DBUS_TYPE_UINT32:
542
544
    case DBUS_TYPE_BOOLEAN:
 
545
    case DBUS_TYPE_UNIX_FD:
543
546
      {
544
547
      volatile dbus_uint32_t *vp = value;
545
548
      pos = _DBUS_ALIGN_VALUE (pos, 4);
839
842
      break;
840
843
    case DBUS_TYPE_INT32:
841
844
    case DBUS_TYPE_UINT32:
 
845
    case DBUS_TYPE_UNIX_FD:
842
846
      return marshal_4_octets (str, insert_at, vp->u32,
843
847
                               byte_order, pos_after);
844
848
      break;
1066
1070
    case DBUS_TYPE_BOOLEAN:
1067
1071
    case DBUS_TYPE_INT32:
1068
1072
    case DBUS_TYPE_UINT32:
 
1073
    case DBUS_TYPE_UNIX_FD:
1069
1074
      return marshal_fixed_multi (str, insert_at, vp, n_elements, byte_order, 4, pos_after);
1070
1075
      break;
1071
1076
    case DBUS_TYPE_INT64:
1114
1119
    case DBUS_TYPE_BOOLEAN:
1115
1120
    case DBUS_TYPE_INT32:
1116
1121
    case DBUS_TYPE_UINT32:
 
1122
    case DBUS_TYPE_UNIX_FD:
1117
1123
      *pos = _DBUS_ALIGN_VALUE (*pos, 4);
1118
1124
      *pos += 4;
1119
1125
      break;
1202
1208
    case DBUS_TYPE_BOOLEAN:
1203
1209
    case DBUS_TYPE_INT32:
1204
1210
    case DBUS_TYPE_UINT32:
 
1211
    case DBUS_TYPE_UNIX_FD:
1205
1212
      /* this stuff is 4 since it starts with a length */
1206
1213
    case DBUS_TYPE_STRING:
1207
1214
    case DBUS_TYPE_OBJECT_PATH:
1256
1263
    case DBUS_TYPE_STRUCT:
1257
1264
    case DBUS_TYPE_DICT_ENTRY:
1258
1265
    case DBUS_TYPE_VARIANT:
 
1266
    case DBUS_TYPE_UNIX_FD:
1259
1267
      return TRUE;
1260
1268
 
1261
1269
    default:
1316
1324
      return "begin_dict_entry";
1317
1325
    case DBUS_DICT_ENTRY_END_CHAR:
1318
1326
      return "end_dict_entry";
 
1327
    case DBUS_TYPE_UNIX_FD:
 
1328
      return "unix_fd";
1319
1329
    default:
1320
1330
      return "unknown";
1321
1331
    }