~ubuntu-branches/ubuntu/vivid/ekiga/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/gui/dxwindow.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kilian Krause
  • Date: 2011-07-17 00:24:50 UTC
  • mfrom: (5.1.5 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110717002450-ytg3wsrc1ptd3153
Tags: 3.3.1-1
* New upstream release.
 - Required libpt-dev 2.10 and libopal-dev 3.10
* Fix debian/watch to catch new version
* Remove libnotify0.7.patch - included upstream
* Add libboost-dev and libboost-signals-dev to Build-Depends
* debian/rules: Don't install *.la files for new internal shared libs
* Fix Vcs URIs to point to correct desktop/experimental/ekiga tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/* Ekiga -- A VoIP and Video-Conferencing application
3
 
 * Copyright (C) 2000-2007 Damien Sandras
 
3
 * Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License as published by
1021
1021
const char* 
1022
1022
DXWindow::ErrorMessage()
1023
1023
{
1024
 
  static char string [1024];
 
1024
  static char buffer[1024];
 
1025
  static char result[1024];
1025
1026
  DWORD dwMsgLen;
1026
1027
 
1027
 
  memset (string, 0, sizeof (string));
 
1028
  memset (buffer, 0, sizeof (buffer));
 
1029
  memset (result, 0, sizeof (result));
1028
1030
  dwMsgLen = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
1029
1031
                             NULL,
1030
1032
                             GetLastError (),
1031
1033
                             MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
1032
 
                             (LPSTR) string,
1033
 
                             sizeof (string)-1,
 
1034
                             (LPSTR) buffer,
 
1035
                             sizeof (buffer)-1,
1034
1036
                             NULL);
1035
1037
  if (dwMsgLen) {
1036
 
    string [ strlen(string) - 2 ] = 0;
1037
 
    snprintf (string, sizeof (string), "%s (%u)", string, (int) GetLastError ());
 
1038
    buffer [ strlen(buffer) - 2 ] = 0;
 
1039
    g_snprintf (result, sizeof (result), "%s (%u)",
 
1040
                buffer, (int) GetLastError ());
1038
1041
  }
1039
1042
  else {
1040
 
    snprintf (string, sizeof (string), "%u", (int) GetLastError ());
 
1043
    g_snprintf (result, sizeof (result), "%u",
 
1044
                (int) GetLastError ());
1041
1045
  }
1042
1046
 
1043
 
  return string;
 
1047
  return result;
1044
1048
}
1045
1049
 
1046
1050
 
1047
1051
const char*
1048
1052
DXWindow::DDErrorMessage(int code)
1049
1053
{
1050
 
  const static char *error;
 
1054
  static const char *error;
1051
1055
  static char errormsg [1024];  
1052
1056
 
1053
1057
  switch (code) {